package com.andf.common.service;

import java.util.List;

import com.andf.common.BaseForm;

/**
 * @Title: GenericService
 * @author lilubing
 * @Description: TODO()
 * @date 2013-4-21 上午10:51:21
 */
@SuppressWarnings("unchecked")
public interface IGenericService {

	/**
	 * 
	 * @Title: getModelAll
	 * @author lilubing
	 * @Description: TODO(查询对象集合)
	 * @param @param baseForm
	 * @param @param formClazz
	 * @return List<Object>
	 * @throws
	 * @date 2013-4-21 上午11:27:34
	 */
    List getModelAll(Class formClazz, BaseForm baseForm);

    /**
     * 
     * @Title: getModel
     * @author lilubing
     * @Description: TODO(查询单个对象)
     * @param @param baseForm
     * @param @param formClazz
     * @return Object
     * @throws
     * @date 2013-4-21 上午11:27:26
     */
    Object getOneModel(Class formClazz, BaseForm baseForm);

    /**
     * 
     * @Title: saveModel
     * @author lilubing
     * @Description: TODO(插入操作不使用事务)
     * @param @param baseForm
     * @param @param formClazz
     * @return Object
     * @throws Exception 
     * @throws 
     * @date 2013-4-21 上午11:27:12
     */
    Object saveModel(Class formClazz, BaseForm baseForm) throws Exception;

    /**
     * 
     * @Title: updateModel
     * @author lilubing
     * @Description: TODO(修改操作使用事物)
     * @param @param baseForm
     * @param @param formClazz
     * @return Object
     * @throws Exception
     * @date 2013-4-21 上午11:26:58
     */
    Object updateModel(Class formClazz, BaseForm baseForm) throws Exception ;

    /**
     * 
     * @Title: deleteModelUseTran
     * @author lilubing
     * @Description: TODO(单个删除包含事务)
     * @param @param baseForm
     * @param @param formClazz
     * @return Object
     * @throws Exception
     * @date 2013-4-21 上午11:26:42
     */
    Object deleteModelUseTran(Class formClazz, BaseForm baseForm) throws Exception;
    
    /**
     * 
     * @Title: deleteModelListUseTran
     * @author lilubing
     * @Description: TODO(删除多个使用事务)
     * @param @param ids
     * @param @param formClazz
     * @return Object
     * @throws Exception
     * @date 2013-4-21 上午11:25:22
     */
    Object deleteModelListUseTran(Class formClazz, String[] ids) throws Exception ;
    
    /**
     * 
     * @Title: getOperateId
     * @author lilubing
     * @Description: TODO(获取操作Id)
     * @param @param type
     * @param @param formClazz
     * @return String
     * @throws
     * @date 2013-4-21 上午11:25:13
     */
	public String getOperateId(String type, Class formClazz);
}
